package com.manage.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 统计看板快照对象 cm_dashboard_stats_snaps
 *
 * @author ruoyi
 * @date 2025-10-05
 */
@Data
@TableName("cm_dashboard_stats_snaps")
public class CmDashboardStatsSnaps {
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 外部唯一id */
    private String publicId;

    /** 案件批次id */
    private Long caseBatchId;

    /** 委托案件总标的金额 */
    private BigDecimal totalEntrustedAmount;

    /** 委托律师费总金额 */
    private BigDecimal totalEntrustedFee;

    /** 委托案件基础律师费总额 */
    private BigDecimal baseFeeTotal;

    /** 基础律师费-到账金额 */
    private BigDecimal baseFeeReceived;

    /** 基础律师费-未到账金额 */
    private BigDecimal baseFeeUnreceived;

    /** 委托案件风险律师费总额 */
    private BigDecimal contingencyFeeTotal;

    /** 风险律师费-到账金额 */
    private BigDecimal contingencyFeeReceived;

    /** 风险律师费-未到账金额 */
    private BigDecimal contingencyFeeUnreceived;

    /** 风险律师费-未到账金额中可结算 */
    private BigDecimal contingencyFeeSettleable;

    /** 委托案件已交保证金总额 */
    private BigDecimal totalDeposit;

    /** 已退保证金 */
    private BigDecimal depositRefunded;

    /** 未退保证金 */
    private BigDecimal depositUnrefunded;

    /** 可退保证金 */
    private BigDecimal depositRefundable;

    /** 可结算已报保证金 */
    private BigDecimal depositReportedSettleable;

    /** 可结算未报保证金 */
    private BigDecimal depositUnreportedSettleable;

    /** 已办结已结算案件 */
    private Long closedSettledCaseCount;

    /** 承办案件总量 */
    private Long totalUndertakenCases;

    /** 在办案件存量 */
    private Long activeCaseCount;

    /** 正常进度案件 */
    private Long normalProgressCount;

    /** 临期案件提醒 */
    private Long approachingDeadlineCount;

    /** 进度超期案件 */
    private Long overdueProgressCount;

    /** 在办案件可结算 */
    private Long activeSettleableCount;

    /** 在办案件不可结算 */
    private Long activeUnsettleableCount;

    /** 快照时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date snapshotTime;

    /**创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    // 省略所有getter和setter方法（因为使用了@Data注解，Lombok会自动生成）

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("publicId", getPublicId())
                .append("caseBatchId", getCaseBatchId())
                .append("totalEntrustedAmount", getTotalEntrustedAmount())
                .append("totalEntrustedFee", getTotalEntrustedFee())
                .append("baseFeeTotal", getBaseFeeTotal())
                .append("baseFeeReceived", getBaseFeeReceived())
                .append("baseFeeUnreceived", getBaseFeeUnreceived())
                .append("contingencyFeeTotal", getContingencyFeeTotal())
                .append("contingencyFeeReceived", getContingencyFeeReceived())
                .append("contingencyFeeUnreceived", getContingencyFeeUnreceived())
                .append("contingencyFeeSettleable", getContingencyFeeSettleable())
                .append("totalDeposit", getTotalDeposit())
                .append("depositRefunded", getDepositRefunded())
                .append("depositUnrefunded", getDepositUnrefunded())
                .append("depositRefundable", getDepositRefundable())
                .append("depositReportedSettleable", getDepositReportedSettleable())
                .append("depositUnreportedSettleable", getDepositUnreportedSettleable())
                .append("closedSettledCaseCount", getClosedSettledCaseCount())
                .append("totalUndertakenCases", getTotalUndertakenCases())
                .append("activeCaseCount", getActiveCaseCount())
                .append("normalProgressCount", getNormalProgressCount())
                .append("approachingDeadlineCount", getApproachingDeadlineCount())
                .append("overdueProgressCount", getOverdueProgressCount())
                .append("activeSettleableCount", getActiveSettleableCount())
                .append("activeUnsettleableCount", getActiveUnsettleableCount())
                .append("snapshotTime", getSnapshotTime())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
